<?php /*a:2:{s:81:"/www/wwwroot/test.usdtes.vip/test/application/adminabc/view/order/list-order.html";i:1678364221;s:77:"/www/wwwroot/test.usdtes.vip/test/application/adminabc/view/public/style.html";i:1678364220;}*/ ?>
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>欢迎页面</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<?php if(app('request')->param('refresh') == '1'): ?>
<meta http-equiv="refresh" content="10" />
<?php endif; ?> <link rel="stylesheet" href="/static/admin/css/font.css">
<link rel="stylesheet" href="/static/admin/css/xadmin.css">
<script type="text/javascript"	src="/static/admin/js/jquery.min.js"></script>
<script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/static/admin/js/xadmin.js"></script>
<script type="text/javascript" src="/static/admin/js/common.js"></script>
<link rel="stylesheet" type="text/css" href="/plugin/webuploader/webuploader.css">
<script type="text/javascript" src="/plugin/webuploader/webuploader.js"></script>
<script type="text/javascript" src="/plugin/clipboard/clipboard.js"></script>
<!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
function uploadimg(f1,f2,f3) {
	//f2 = "'" + f2 + "'";
	//alert(f2);
	var $list =$(f1);
	var thumbnailWidth = 150;
	var thumbnailHeight = 150;
	// 初始化Web Uploader
	var uploader = WebUploader.create({
		// 选完文件后，是否自动上传。
		auto: true,
		// swf文件路径
		swf: '/plugin/webuploader/Uploader.swf',
		// 文件接收服务端。
		server: '/plugin/uploadify/uploader.php',
		// 选择文件的按钮。可选。
		// 内部根据当前运行是创建，可能是input元素，也可能是flash.
		pick: f2,
		// 只允许选择图片文件。
		accept: {
			title: 'Images',
			extensions: 'gif,jpg,jpeg,bmp,png',
			mimeTypes: 'image/*'
		}
	});
	// 当有文件添加进来的时候
	uploader.on( 'fileQueued', function( file ) {
	    var $li = $('<div id="' + file.id + '" class="file-item thumbnail">' +  '<img></div>'),
	        $img = $li.find('img');
	    
	    // $list为容器jQuery实例
	    $list.html( $li );

	    // 创建缩略图
	    // 如果为非图片文件，可以不用调用此方法。
	    // thumbnailWidth x thumbnailHeight 为 100 x 100
	    uploader.makeThumb( file, function( error, src ) {
	        if ( error ) {
	            $img.replaceWith('<span>不能预览</span>');
	            return;
	        }
	        $img.attr( 'src', src );
	    }, thumbnailWidth, thumbnailHeight );
	});
	uploader.on('uploadSuccess', function(file, response){
		  $(f3).val(response._raw);
	});
}
</script>
<script type="text/javascript">
          $(document).ready(function(){
        		layui.use(['form','table'], function() {
        			var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
        			//……

        			//但是，如果你的HTML是动态生成的，自动渲染就会失效
        			//因此你需要在相应的地方，执行下述方法来手动渲染，跟这类似的还有 element.init();
        			form.render();
                    form.on("select(auth_type)",function(res){
                    	var id = $(res.elem).attr("data-id");
            			$.ajax({
           				    type : 'post',
           				    url : "<?php echo url('edit'); ?>",
           				    dataType : "json",
           				    data : "status=2&type=" + res.value + "&id=" + id,
           				    success : function(result) {
           				    	layer.msg(result.msg);
           					    window.location.reload();
           				    }
           			    });  
                    })
        		});
          	  var clipboard = new ClipboardJS('#copy',{
                  text: function(trigger) {
                       layer.msg("复制成功！");
                       return trigger.getAttribute('data-text');
                  }
              });
              $(".btnstatus").click(function(){
           	   var id = $(this).attr("data-id");
   			   $.ajax({
				    type : 'post',
				    url : "<?php echo url('edit'); ?>",
				    dataType : "json",
				    data : "type=base&id=" + id + "&status=" +  $(this).attr("data-status"),
				    success : function(result) {
				    	layer.msg(result.msg);
					    window.location.reload();
				    }
			    });           	   
              })
              $(".btnwin").click(function(){
            	  var url = "<?php echo url('Order/msg'); ?>?id="  + $(this).attr("data-id");
            	  xadmin.open('弹窗消息',url,550,550);
              })
        	  $(".btnip").click(function() {
      			var ip = $(this).attr("data-ip");
      			 $.ajax({
      				    type: 'post',
      				    url: "<?php echo url('ipforbid'); ?>",
      				    dataType: "json",
      				    data: 'ip=' + ip,
      				    success: function(res) {
      				    	layer.msg(res.msg);
      				    }
      				});
      		  })              
          })
</script>
</head>
<body>
	<div class="x-nav">
		<span class="layui-breadcrumb">
			<a href="">首页</a>
			<a href="">订单管理</a>
			<a><cite>订单列表</cite></a>
		</span>
		<a class="layui-btn layui-btn-small" style="line-height: 1.6em; margin-top: 3px; float: right" onclick="location.reload()" title="刷新">
			<i class="layui-icon layui-icon-refresh" style="line-height: 30px"></i>
		</a>
	</div>
	<div class="layui-fluid">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-body ">
						<form class="layui-form layui-col-space5" method="post">
							<div class="layui-input-inline layui-show-xs-block">
								<input class="layui-input" placeholder="开始日" name="start" id="start">
							</div>
							<div class="layui-input-inline layui-show-xs-block">
								<input class="layui-input" placeholder="截止日" name="end" id="end">
							</div>
							<div class="layui-input-inline layui-show-xs-block">
								<select name="type">
									<option value='1'>按订单号</option>
								</select>
							</div>
							<div class="layui-input-inline layui-show-xs-block">
								<select name="status">
									<option value="">订单状态</option>
									<option value="0">处理中</option>
									<option value="1">成功</option>
									<option value="2">失败</option>
								</select>
							</div>
							<div class="layui-input-inline layui-show-xs-block">
								<input type="text" name="kw" placeholder="请输入" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-input-inline layui-show-xs-block">
								<button class="layui-btn" lay-submit="" lay-filter="sreach">
									<i class="layui-icon">&#xe615;</i>
								</button>
							</div>
							<?php if(app('request')->param('refresh') == '1'): ?>
							<div class="layui-input-inline layui-show-xs-block">
								<a class="layui-btn" href="<?php echo url('',array('refresh'=>0)); ?>">关闭刷新</a>
							</div>
							<?php else: ?>
							<div class="layui-input-inline layui-show-xs-block">
								<a class="layui-btn" href="<?php echo url('',array('refresh'=>1)); ?>">开启刷新</a>
							</div>
							<?php endif; ?>
						</form>
					</div>
					<div class="layui-card-body ">
						<table class="layui-table layui-form">
							<thead>
								<tr>
								    <th>订单号</th>
									<th>转账用户id</th>
									<th>转账用户账号</th>									
									<th>转账金额</th>
									<th>收款用户id</th>
									<th>收款用户账号</th>									
									<th>订单时间</th>
									<th>状态</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<?php if(is_array($data->items()) || $data->items() instanceof \think\Collection || $data->items() instanceof \think\Paginator): $i = 0; $__LIST__ = $data->items();if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
								<tr>
								    <td><?php echo htmlentities($vo['order_id']); ?></td>
									<td><?php echo htmlentities($vo['user_id']); ?></td>
									<td><?php echo htmlentities($vo['user_name']); ?></td>									
									<td><?php echo htmlentities($vo['money']); ?></td>
									<td><?php echo htmlentities($vo['receive_uid']); ?></td>
									<td><?php echo htmlentities($vo['receive_username']); ?></td>
									<td><?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['create_time'])? strtotime($vo['create_time']) : $vo['create_time'])); ?></td>
									<td>
									   <?php if($vo['status'] == '0'): ?><span class="layui-btn layui-btn-disabled">审核中</span><?php endif; if($vo['status'] == '1'): ?><span class="layui-btn">通过</span><?php endif; if($vo['status'] == '2'): ?><span class="layui-btn layui-btn-normal layui-btn-danger">失败</span><?php endif; ?>								
									</td>
									<td class="td-manage">
										<a title="查看" href="javascript:void(0);" onclick="xadmin.open('编辑','<?php echo url("info",array("id"=> $vo["order_id"])); ?>')"  class="layui-btn">查看</a>
										<a title="删除" onclick="remove_del(this,'<?php echo url("del",array("id"=>$vo['order_id'])); ?>')" href="javascript:void(0);" class="layui-btn layui-btn-normal">删</a>
									</td>
								</tr>
								<?php endforeach; endif; else: echo "" ;endif; ?>
							</tbody>
						</table>
					</div>
					<div class="layui-card-body">
						<div class="page">
							<div class="page"><?php echo $data->render(); ?></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<include file="Public/footer" />
	</div>
</body>
<script>
       layui.use(['laydate', 'form'],
        function() {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });
     </script>
</html>